home *** CD-ROM | disk | FTP | other *** search
- Path: news.wwa.com!news
- From: pdubois@wwa.com (PDuBois)
- Newsgroups: comp.lang.c++
- Subject: Re: Borland C++ 4.52 OWL child dialog question
- Date: Wed, 13 Mar 1996 03:07:24 GMT
- Organization: SaturnSoft
- Message-ID: <4i5e14$nj0@kirin.wwa.com>
- References: <1223.6645T140T1158@cis.ufl.edu>
- NNTP-Posting-Host: pool2-027.wwa.com
- X-Newsreader: Forte Free Agent 1.0.82
-
- ep@cis.ufl.edu (Ed Porras) wrote:
-
- >Hi,
-
- >I'm running Win95 and coding with Borland C++ 4.52.. our project is
- >using OWL with resources..
-
- >the problem is when we have a dialog with a child dialog, is there something
- >that I must take care of to handle the correct destruction of them?
- >is, for some reason, the HWindow shared between the two? the reason
- >i'm asking is because if the user pops up the first (parent), and then
- >activates a callback to popup it's child dialog an exeption will occur
- >upon exiting the application if IDCANCEL was returned by both dialogs..
-
- >my destructors are both calling Destroy() and then deleting private members
- >that i've allocated..
-
- >i've traced through the exiting, and the execption is occurs nowhere in
- >my code.. it happens after - as if it's deallocating something that is not
- >there..
-
- >does anyone know about this? please mail me at
-
- >ep@cis.ufl.edu
-
-
- >thanks
-
- >-e
-
- >--
- >---------------------------------------------------------------
- > Ed Porras | Email: ep@cis.ufl.edu
- > 2777 SW Archer Rd. AJ-308 | WWW: http://www.cis.ufl.edu/~ep/
- > Gainesville, Fl 32608 | University of Florida, CISE Dept.
- > (352) 335-8169 | Work: (352) 373-2626
- >---------------------------------------------------------------
-
- Ed,
-
- Your not deleting the child dialogs, are you? You don't have to
- and SHOULD NOT delete anything that you assign to a parent. If you
- create a dialog, passing a pointer to it's parent, then you dont have
- explicitly delete the child. When you delete the parent, it will take
- care of it for you.
-
- Owl is confusing in this way. It also holds that if you create a
- window, and pass a pointer to a child window to the constructor, the
- same holds true.
-
- Hope this helps,
-
- Paul
-
-
-
-